package com.dz.lm.dao;

import java.io.Serializable;

import com.dz.lm.common.exception.DaoException;
import com.dz.lm.domain.BasicObject;

/**
 * 
 * @author zhanghairong
 * @since 2019-05-28
 * @param <T>
 * @param <ID>
 */
public interface BasicWriterDao<T extends BasicObject, ID extends Serializable> {
    /**
     * 根据主键删除
     * @param id
     * @return
     * @throws DaoException
     */
    int deleteByPrimaryKey(String id) throws DaoException;
    /**
     * 新增
     * @param record
     * @return
     * @throws DaoException
     */
    int insert(T record) throws DaoException;
    /**
     * 修改部分列内容
     * @param record
     * @return
     * @throws DaoException
     */
    int updateByPrimaryKeySelective(T record) throws DaoException;
    /**
     * 修改全部的列内容
     * @param record
     * @return
     * @throws DaoException
     */
    int updateByPrimaryKey(T record) throws DaoException;
}
